forked from aiidateam/aiida-core
-
Notifications
You must be signed in to change notification settings - Fork 0
Tranport/core.openssh #10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
agoscinski
wants to merge
10
commits into
main
Choose a base branch
from
tranport/core.openssh
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…|play|pause}` (aiidateam#6902) The original design of `wait` and `timeout` was to distinguish between actions that immediately return and actions that scheduled. This mechanism was however never used and resulted in an misinterpretation in the force-kill PR aiidateam#6793 introducing a bug fixed in PR $6870. The mechanism of `wait` and `timeout` was also never correctly implemented. In this PR we rectify the logic and simplify it by handling immediate and scheduled actions the same way. My interpretation is that the original logic (seen in commit 8388018) is that it unwraps the future once, if it is a another future then it is a scheduled action otherwise an immediate one. Then 1b6ecb8 in plumpy introduced a double wrapping for `play`, `pause` and `kill` of the return value which I think is correct as these are scheduled actions. The problem appears in cd0d15c where on the aiida-core side in the first round unwrapping is always done till the actual (nonfuture) result by using `unwrap_kiwi_future`. This makes the usage of `wait` completely obsolete as we always get the final nonfuture result in the first step. Also the `timeout` was not passed to the `result` which made it a blocking action for scheduled tasked (the `timeout` is only applied on the first layer of future in `futures.as_completed` which is meaningless since the first layer is always a future and returns immediately). This is fixed by simplifying the two step procedure, unwrap once and if future unwrap again, to one step: Unwrap until nonfuture result gained with timeout. One can specify a `timeout == 0` to express that the action should not wait for a response while one can specify `timeout==float('inf')` (default value) to wait until a response has been received without a timeout.
This bug was introduced in PR aiidateam#6610, where the temporary config folder path was changed unintentionally. Previously, it was set to `/tmp/pytest-.../config/.aiida`, but the new setup used `/tmp/pytest-.../config/`. As a result, the daemon_client fixture failed to detect the profile, leading to subtle issues. This bug was masked by two factors: - The CI setup (`setup.sh`) which preconfigures AiiDA profiles. - The fixture definitions in `tests/conftest.py`, which interfered with the intended isolation of aiida_instance. A follow-up commit will address this entanglement by clearly separating fixture configuration and test logic.
Previously, legacy pytest fixtures were only tested via `tests/manage/tests/test_pytest_fixtures.py`. These tests were inadvertently affected by: - Fixtures in `tests/conftest.py`, which caused test contamination. - The CI environment, where AiiDA profiles were already created via setup.sh. To ensure true isolation: - The `--no-conftest` flag is now used to prevent loading `conftest.py`. - A new CI job in the ci-code workflow has been added to run these tests independently. - The test file has been relocated to the src directory to avoid interference from the main test suite.
Fixes aiidateam#6881. See individual commits for detailed changes.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.